package com.lengyu.vxminiprogram.common;

import org.springframework.transaction.interceptor.TransactionAspectSupport;

public class SpringRollBackUtil {
    /**
     * 事务回滚机制
     */
    public static void rollBack() {
        try {
            TransactionAspectSupport.currentTransactionStatus().setRollbackOnly();
        } catch (Exception e) {
            e.printStackTrace();
        }
    }
}
